package zhou.jan07.self_contest04;

public class Vehicle {
	
	static int speed;
	static float size;
	public int getSpeed() {
		return speed;
	}
	public void setSpeed(int speed) {
		this.speed = speed;
	}
	public float getSize() {
		return size;
	}
	public void setSize(float size) {
		this.size = size;
	}
	
	void move(){
		System.out.println("速度为："+speed);
	}
	void speedUp(){
		int speed1 =speed+20;
		System.out.println("加速后的速度："+speed1);
		}
	
	void speedDown(){
		int speed2=speed-20;
		System.out.println("减速后的速度："+speed2);
	}
	
	public static void main(String[] args) {
	
		Vehicle car=new Vehicle();
		car.setSpeed(60);
		car.setSize(50.8f);
		
		//System.out.println("初始速度为："+speed+"  "+"初始体积为："+size);
		
		car.move();
		car.speedUp();
		car.speedDown();
		
	
	}
}
